In a processing apparatus that executes multiple programs and processes data, the execution sequence of the programs is determined using a table. For example, according to one such processing apparatus, the addresses of the programs are stored to an address table, and a processor reads in the addresses stored in the address table and jumps to a relevant address (for example, refer to Japanese Laid-Open Patent Publication No. S60-246441). Further, another processing apparatus sets the execution sequence of processes into an address table (for example, refer to Japanese Laid-Open Patent Publication No. S53-18932).
Nonetheless, with the conventional technologies, the next process to be performed cannot be easily changed when the execution of a program is properly ended and when the execution of a program is prematurely stopped. For example, when an error occurs during the execution of a given program, as the next process, an error process corresponding to the program cannot be switched to and executed. In particular, in a case where multiple programs are sequentially switched and although an error process for each of the programs is necessary, proper ending of the programs is assumed and therefore, only the switching of programs is performed. As a result, when an error occurs during the execution of a program, the executed program cannot be handled by switching to an error processing program that should be executed next.
More specifically, in a case of a processing apparatus that cannot obtain a stable power supply, it is conceivable that execution of a program may be prematurely stopped consequent to a loss of power supply during the execution of the program. To cope with such a situation, an error process for the error that occurred has to be executed even if the processor is started up from an initialized state when the power supply is restored. However, this does not occur.